<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_course_task".
 *
 * @property int $id
 * @property int $course_id 课程id
 * @property string $title 标题
 * @property string $content 内容
 * @property string $status 通知状态
 * @property int $type 通知状态
 * @property int $major_id 专业ID
 * @property int $create_by 创建人ID
 * @property string $create_time 创建时间
 * @property int $update_by 修改人ID
 * @property string $update_time 修改时间
 * @property string $del_flag 
 * @property int $old_id
 */
class TCourseNotice extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_course_notice';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id','course_id', 'title', 'content', 'create_by'], 'required'],
            [['del_flag'], 'integer'],
            [['title', 'content', 'status', 'type'], 'string'],
            [['create_time', 'update_time'], 'safe'],
            [['title'], 'string', 'max' => 255],
            [['status', 'type'], 'string', 'max' => 64],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'course_id' => Yii::t('app', '课程id'),
            'title' => Yii::t('app', '标题'),
            'content' => Yii::t('app', '内容'),
            'status' => Yii::t('app', '状态'),
            'major_id' => Yii::t('app', '专业ID'),
            'create_by' => Yii::t('app', 'Create By'),
            'create_time' => Yii::t('app', 'Create Time'),
            'update_by' => Yii::t('app', 'Update By'),
            'update_time' => Yii::t('app', 'Update Time'),
            'del_flag' => Yii::t('app', 'Del Flag'),
            'old_id'=>'3.0迁移公告id'
        ];
    }
}
